package uvt.gui.mainframe.object.memento;

import uvt.gui.mainframe.object.memento.container.Container;

public class MementoImp implements MementoOperations {
	
	private Container container;
	
	public MementoImp() {
		container = null;
	}
	
	public MementoImp(Container container) {
		this.container = container;
	}
	
	public PreviousOperationToCareTaker backup() {
		return new PreviousOperationImp(container);
	}
	
	public void restore(PreviousOperationToCareTaker memento) {
		this.container = ((PreviousOperationToOriginator)memento).getContainer();
	}
	
	public void setContainer(Container container) {
		this.container = container;
	}
	
	public Container getContainer() {
		return container;
	}

}